import { createWebHistory, createRouter } from 'vue-router'

import Home from "../views/Home.vue";
import Login from "../views/Login.vue";
import Register from "../views/Register.vue";
import List from "../views/List.vue";
import Detail from "../views/Detail.vue";
import Carts from "../views/Carts.vue";
import Checkout from "../views/Checkout.vue";

const routes = [
    { path: '/', component: Home },
    { path: '/login', component: Login },
    { path: '/register', component: Register },
    { path: '/list', component: List },
    {path: '/detail/:id',component: Detail},
    {path: '/carts',component: Carts},
    {path: '/checkout',component: Checkout},
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router